#!/usr/bin/env python
# -*- coding: utf-8 -*-

import locale
CONSOLE_ENCODE = locale.getpreferredencoding()

import TrainGrade
import unittest
import getTimetableLog

class TestSequenceFunctions(unittest.TestCase) :
    def setUp(self) :
        self.logger = getTimetableLog.logging.getLogger("gettimetable")

    def tearDown(self) :
        pass

    def testPutList(self) :
        grade = TrainGrade.TrainGrade(self.logger)
        for item in grade.gradeList :
            print item.encode(CONSOLE_ENCODE)


    def testNameList(self) :
        grade = TrainGrade.TrainGrade(self.logger)
        for item in grade.nameList :
            print item.encode(CONSOLE_ENCODE)


    def testReType(self) :
        grade = TrainGrade.TrainGrade(self.logger)
        for item in grade.nameList :
            print (u"%d\t%s"%(grade.getCode(item), item)).encode(CONSOLE_ENCODE)
        

if __name__ == "__main__" :
    unittest.main()
